]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Remove NOTIFY_SOCKET from environment
authorBenjamin Berg <bberg@redhat.com>
Mon, 23 Sep 2019 09:04:18 +0000 (11:04 +0200)
committerBenjamin Berg <bberg@redhat.com>
Mon, 23 Sep 2019 09:09:39 +0000 (11:09 +0200)
It is only used exactly once to notify systemd about the service
startup. So unset it as soon as possible as it can leak into
subprocesses we spawn otherwise.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/741

src/main.c

index 8be1395f7099775649b38fedb92ee71abae8ddad..489026b76573d7e4e25729401e005e5f66d7d0c6 100644 (file)
@@ -532,7 +532,9 @@ main (int argc, char **argv)
   shell_init_debug (g_getenv ("SHELL_DEBUG"));
 
   shell_dbus_init (meta_get_replace_current_wm ());
-  sd_notify (0, "READY=1");
+  /* We only use NOTIFY_SOCKET exactly once; unset it so it doesn't remain in
+   * our environment. */
+  sd_notify (1, "READY=1");
   shell_a11y_init ();
   shell_perf_log_init ();
   shell_introspection_init ();